package com.handinfo.android.ui.window;

import java.io.DataInputStream;
import java.io.IOException;

import android.graphics.Bitmap;

import com.handinfo.android.DWGameManager;
import com.handinfo.android.core.graphics.DWFont;
import com.handinfo.android.game.Attribute;
import com.handinfo.android.game.GameMessage;
import com.handinfo.android.game.IconManger;
import com.handinfo.android.game.Role;
import com.handinfo.android.game.item.Item;
import com.handinfo.android.game.item.ItemConstants;
import com.handinfo.android.game.item.ItemEquipment;
import com.handinfo.android.game.item.ItemGem;
import com.handinfo.android.ui.IUIWindows;
import com.handinfo.android.ui.UIWindows;
import com.handinfo.android.uicontrols.DWControlsManager;
import com.handinfo.android.uicontrols.DWListener;
import com.handinfo.android.uicontrols.controls.DWBackground;
import com.handinfo.android.uicontrols.controls.DWButton;
import com.handinfo.android.uicontrols.controls.DWControl;
import com.handinfo.android.uicontrols.controls.DWFrame;
import com.handinfo.android.uicontrols.controls.DWGrid;
import com.handinfo.android.uicontrols.controls.DWImageBox;
import com.handinfo.android.uicontrols.controls.DWLabel;
import com.handinfo.android.uicontrols.controls.DWListSubItem;
import com.handinfo.android.uicontrols.controls.DWListbox;
import com.handinfo.android.uicontrols.controls.DWPercentBar;
import com.handinfo.android.uicontrols.controls.DWTextbox;
import com.handinfo.android.uicontrols.controls.DWTitle;
//import com.handinfo.android.utils.ChannelOperation;
import com.handinfo.android.utils.Tools;

public class UIVip implements IUIWindows{
	public DWFrame m_vip_frame = null;
	private DWTitle m_vip_title = null;
	private DWImageBox m_imageBox_title = null;
	private Bitmap m_bm_title = null;
	private DWImageBox m_imageBox_close = null;
	private Bitmap m_bm_close = null;
	private DWBackground m_background_big = null;
	private DWImageBox m_imageBox_mm = null;
	private Bitmap m_bm_mm = null;
	//当前
	private DWTextbox m_textBox_level = null;
	private DWPercentBar m_pb_level = null;
	private Bitmap m_bm_top = null;
	private Bitmap m_bm_buttom = null;
	private DWTextbox m_textBox_state = null;
	private DWButton m_button_level = null;
	private Bitmap m_bm_level01 = null;
	private Bitmap m_bm_level02 = null;
	private DWImageBox m_image_vip = null;
	private DWTextbox m_textBox_xianshi = null;
	//首充奖励
	private DWTextbox m_text_first = null;
	private DWImageBox m_imageBox_first = null;
	private Bitmap m_bm_hezi = null;
	private DWTextbox m_text_firstNotice  = null;
	private DWButton m_button_first = null;
	//vip显示
	private DWTextbox m_textBox_vip = null;
	private DWTextbox m_textBox_vipLevel = null;
	private DWListbox m_listBox_vip = null;
	private DWBackground m_background_vip = null;
	private DWImageBox[] m_imageBox_vip = new DWImageBox[6];
	private Bitmap[] m_bm_vip = new Bitmap[6];
	private byte m_vip01 = 0;
	private byte m_vip02 = 1;
	private byte m_vip03 = 2;
	private byte m_vip04 = 3;
	private byte m_vip05 = 4;
	private byte m_vip06 = 5;
//	private byte m_vip01 = 0;
	private DWImageBox[] m_imageBox_background = new DWImageBox[6];
	private Bitmap m_bm_background = null;
	private Bitmap m_bm_background01 = null;
	private DWListSubItem[] m_vip_item;
	private DWTextbox[] m_vip_textBox;

	//右侧礼包
	private int M_LIBAO = 0;
	private String[] m_libao_key = null;
	private int[] m_libao_icon;
	private int[] m_libao_count;
	private Item[] m_item;
	private int m_libao_status = 0;
	private DWTextbox m_libao_text = null;
	private DWImageBox[] m_libao_image = new DWImageBox[2];
	private Bitmap m_bm_libao = null;
	private DWGrid[] m_libao_grid;//可以换成 image
	private Bitmap m_gr_libao = null;

	private DWImageBox[] m_wupin_icon;
	private Bitmap[] m_bm_icon;

	private DWListbox m_libao_list = null;
	private DWTextbox[] m_libao_num = null;
	private DWListSubItem[] m_libao_item = null;
	//领取按钮
	private DWButton m_button = null;
	private Bitmap m_button_libao = null;


	private boolean flag = false;

	private void createVip(){
		m_vip_frame = new DWFrame(DWFrame.FRAME_TYPE_FULL, true);
		m_vip_frame.setClickClose(false);
		m_vip_title = new DWTitle("", m_vip_frame);
		m_imageBox_title = new DWImageBox(m_bm_title);
		m_imageBox_title.setNearAnchor(m_vip_title, Tools.HCENTER_VCENTER, Tools.HCENTER_VCENTER, 0, 0);
		//关闭窗口
		m_imageBox_close = new DWImageBox(m_bm_close);
		m_imageBox_close.setTouchZoomIn(20, 20);
		m_imageBox_close.addListener(m_close);
		m_imageBox_close.setNearAnchor(m_vip_title, Tools.RIGHT_TOP, Tools.RIGHT_TOP, 0, 0);
		//背景
		m_background_big = new DWBackground(m_vip_frame.getShowWidth() - 50, m_vip_frame.getShowHeight() - 50);
		m_background_big.setNearAnchor(m_vip_frame, Tools.HCENTER_VCENTER, Tools.HCENTER_VCENTER, 0, 0);

		//右侧礼包
//		m_imageBox_mm = new DWImageBox(m_bm_mm);
		m_libao_text = new DWTextbox("<mark c=FFBB11>VIP"+m_level+":</mark>");
		m_libao_text.setNearAnchor(m_background_big, Tools.LEFT_TOP, Tools.LEFT_TOP, DWGameManager.Screen_Width*5/128, DWGameManager.Screen_Height*5/72);

		m_libao_image[0] = new DWImageBox(m_bm_libao);
		m_libao_image[1] = new DWImageBox(m_bm_libao);

		m_libao_image[0].setNearAnchor(m_libao_text, Tools.LEFT_BOTTOM, Tools.RIGHT_TOP,DWGameManager.Screen_Width*15/128, DWGameManager.Screen_Height*5/72);
		m_libao_image[1].setNearAnchor(m_libao_image[0], Tools.HCENTER_VCENTER	, Tools.HCENTER_VCENTER, -m_libao_image[0].getShowWidth()/3, m_libao_image[0].getShowHeight()/3);

		m_libao_list = new DWListbox(DWGameManager.Screen_Width*30/128, DWGameManager.Screen_Height*40/72);
		m_libao_list.setShowBackgroundRect(false);
		m_libao_list.setNearAnchor(m_background_big, Tools.LEFT_TOP, Tools.LEFT_TOP, DWGameManager.Screen_Width*6/128, DWGameManager.Screen_Height*15/72);

		refreshLiBao();

		//当前
		m_textBox_level = new DWTextbox("<mark c=FFBB11>当前级别:</mark>");
//		if(DWGameManager.AdpaterType == 2){
			m_textBox_level.setNearAnchor(m_background_big, Tools.LEFT_TOP	, Tools.LEFT_TOP, m_background_big.getShowWidth()/3, 20);
//		}else{
//			m_textBox_level.setNearAnchor(m_imageBox_mm, Tools.LEFT_TOP	, Tools.RIGHT_TOP, 10, -30);
//		}

		m_image_vip = new DWImageBox(m_bm_vip[m_vip01]);
		if(m_level == 2){
			m_image_vip.setBackground(m_bm_vip[m_vip02], true);
		}else if(m_level == 3){
			m_image_vip.setBackground(m_bm_vip[m_vip03], true);
		}else if(m_level == 4){
			m_image_vip.setBackground(m_bm_vip[m_vip04], true);
		}else if(m_level == 5){
			m_image_vip.setBackground(m_bm_vip[m_vip05], true);
		}else if(m_level == 6){
			m_image_vip.setBackground(m_bm_vip[m_vip06], true);
		}
		if(DWGameManager.AdpaterType == 2){
			m_image_vip.setNearAnchor(m_textBox_level, Tools.LEFT_TOP, Tools.HCENTER_BOTTOM	, 0, 30);
		}else{
			m_image_vip.setNearAnchor(m_textBox_level, Tools.LEFT_TOP, Tools.HCENTER_BOTTOM	, 0, 10);
		}

		m_pb_level = new DWPercentBar(300, m_bm_top, m_bm_buttom);
		m_pb_level.setPercent(m_num, m_numMax);
		m_pb_level.setNearAnchor(m_image_vip, Tools.LEFT_VCENTER, Tools.RIGHT_VCENTER, 10, 0);

		m_textBox_xianshi = new DWTextbox(m_num+"/"+m_numMax);
		m_textBox_xianshi.setNearAnchor(m_pb_level, Tools.HCENTER_VCENTER, Tools.HCENTER_VCENTER, 0, 0);

		m_textBox_state = new DWTextbox("再充值"+(m_numMax-m_num)/10+"元，兑换"+(m_numMax-m_num)+"元宝，免费获得VIP"+(m_level+1));
		m_textBox_state.setNearAnchor(m_pb_level, Tools.HCENTER_TOP, Tools.HCENTER_BOTTOM, -5, 5);
		if(m_level == 6){
			m_textBox_state.setShow(false);
		}

		m_button_level = new DWButton("立即充值", m_bm_level01);
		m_button_level.setDownImage(m_bm_level02);
		m_button_level.addListener(m_chongzhi);
		m_button_level.setNearAnchor(m_pb_level, Tools.LEFT_VCENTER, Tools.RIGHT_VCENTER, 5, 0);
		//首次
//		m_text_first = new DWTextbox("<mark c=FFBB11>首充包箱:</mark>");
//		m_text_first.setNearAnchor(m_textBox_level, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 60);
//
//		m_imageBox_first = new DWImageBox(m_bm_hezi);
//		m_imageBox_first.setNearAnchor(m_text_first, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 5);
//
//		m_text_firstNotice = new DWTextbox("首次充值，即可领取神秘宝箱");
//		m_text_firstNotice.setNearAnchor(m_imageBox_first, Tools.LEFT_VCENTER, Tools.RIGHT_VCENTER, 10, 0);
//
//		m_button_first = new DWButton("领取宝箱", m_bm_level01);
//		m_button_first.setDownImage(m_bm_level02);
//		m_button_first.addListener(m_lingqu);
//		m_button_first.setNearAnchor(m_text_firstNotice, Tools.LEFT_VCENTER, Tools.RIGHT_VCENTER, 10, 0);
		//vip
		m_textBox_vip = new DWTextbox("<mark c=FFBB11>VIP特权:</mark>");
		if(DWGameManager.AdpaterType == 2){
			m_textBox_vip.setNearAnchor(m_textBox_level, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, DWGameManager.Screen_Height*12/72);
			m_background_vip = new DWBackground(DWGameManager.Screen_Width*60/128, DWGameManager.Screen_Height*30/72);
			m_background_vip.setFill(true);
//			m_background_vip.setNearAnchor(m_textBox_vip, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 20);
			m_background_vip.setNearAnchor(m_textBox_vip, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, DWGameManager.Screen_Height*7/72);
		}else{
			m_textBox_vip.setNearAnchor(m_textBox_level, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 80);
			m_background_vip = new DWBackground(480, 180);
			m_background_vip.setFill(true);
			m_background_vip.setNearAnchor(m_textBox_vip, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 30);
		}


		m_imageBox_vip[m_vip01] = new DWImageBox(m_bm_vip[m_vip01]);
		m_imageBox_vip[m_vip02] = new DWImageBox(m_bm_vip[m_vip02]);
		m_imageBox_vip[m_vip03] = new DWImageBox(m_bm_vip[m_vip03]);
		m_imageBox_vip[m_vip04] = new DWImageBox(m_bm_vip[m_vip04]);
		m_imageBox_vip[m_vip05] = new DWImageBox(m_bm_vip[m_vip05]);
		m_imageBox_vip[m_vip06] = new DWImageBox(m_bm_vip[m_vip06]);
//		m_imageBox_vip[m_vip06].setShow(false);
//		m_imageBox_vip[m_vip06].setTouch(false);

		m_imageBox_vip[m_vip01].setTouchZoomIn(20, 20);
		m_imageBox_vip[m_vip02].setTouchZoomIn(20, 20);
		m_imageBox_vip[m_vip03].setTouchZoomIn(20, 20);
		m_imageBox_vip[m_vip04].setTouchZoomIn(20, 20);
		m_imageBox_vip[m_vip05].setTouchZoomIn(20, 20);
		m_imageBox_vip[m_vip06].setTouchZoomIn(20, 20);

		m_imageBox_vip[m_vip01].addListener(m_open_vip01);
		m_imageBox_vip[m_vip02].addListener(m_open_vip02);
		m_imageBox_vip[m_vip03].addListener(m_open_vip03);
		m_imageBox_vip[m_vip04].addListener(m_open_vip04);
		m_imageBox_vip[m_vip05].addListener(m_open_vip05);
		m_imageBox_vip[m_vip06].addListener(m_open_vip06);

		m_imageBox_vip[m_vip01].setNearAnchor(m_background_vip, Tools.LEFT_TOP, Tools.LEFT_TOP, 50, -DWGameManager.Screen_Height*3/72);
		m_imageBox_vip[m_vip02].setNearAnchor(m_imageBox_vip[m_vip01], Tools.LEFT_TOP, Tools.RIGHT_TOP, 50, 0);
		m_imageBox_vip[m_vip03].setNearAnchor(m_imageBox_vip[m_vip02], Tools.LEFT_TOP, Tools.RIGHT_TOP, 50, 0);
		m_imageBox_vip[m_vip04].setNearAnchor(m_imageBox_vip[m_vip03], Tools.LEFT_TOP, Tools.RIGHT_TOP, 50, 0);
		m_imageBox_vip[m_vip05].setNearAnchor(m_imageBox_vip[m_vip04], Tools.LEFT_TOP, Tools.RIGHT_TOP, 50, 0);
		m_imageBox_vip[m_vip06].setNearAnchor(m_imageBox_vip[m_vip05], Tools.LEFT_TOP, Tools.RIGHT_TOP, 50, 0);
		//vip图标背景
		m_imageBox_background[m_vip01] = new DWImageBox(m_bm_background);
		m_imageBox_background[m_vip02] = new DWImageBox(m_bm_background);
		m_imageBox_background[m_vip03] = new DWImageBox(m_bm_background);
		m_imageBox_background[m_vip04] = new DWImageBox(m_bm_background);
		m_imageBox_background[m_vip05] = new DWImageBox(m_bm_background);
		m_imageBox_background[m_vip06] = new DWImageBox(m_bm_background);
//		m_imageBox_background[m_vip01].setShowWideHigh(m_imageBox_vip[m_vip01].getShowWidth()*2, m_imageBox_vip[m_vip01].getShowHeight()*2);
//		m_imageBox_background[m_vip02].setShowWideHigh(m_imageBox_vip[m_vip02].getShowWidth()*2, m_imageBox_vip[m_vip02].getShowHeight()*2);
//		m_imageBox_background[m_vip03].setShowWideHigh(m_imageBox_vip[m_vip03].getShowWidth()*2, m_imageBox_vip[m_vip03].getShowHeight()*2);
//		m_imageBox_background[m_vip04].setShowWideHigh(m_imageBox_vip[m_vip04].getShowWidth()*2, m_imageBox_vip[m_vip04].getShowHeight()*2);
//		m_imageBox_background[m_vip05].setShowWideHigh(m_imageBox_vip[m_vip05].getShowWidth()*2, m_imageBox_vip[m_vip05].getShowHeight()*2);
//		m_imageBox_background[m_vip06].setShowWideHigh(m_imageBox_vip[m_vip06].getShowWidth()*2, m_imageBox_vip[m_vip06].getShowHeight()*2);
		m_imageBox_background[m_vip01].setNearAnchor(m_imageBox_vip[m_vip01], Tools.HCENTER_VCENTER, Tools.HCENTER_VCENTER, 0, 0);
		m_imageBox_background[m_vip02].setNearAnchor(m_imageBox_vip[m_vip02], Tools.HCENTER_VCENTER, Tools.HCENTER_VCENTER, 0, 0);
		m_imageBox_background[m_vip03].setNearAnchor(m_imageBox_vip[m_vip03], Tools.HCENTER_VCENTER, Tools.HCENTER_VCENTER, 0, 0);
		m_imageBox_background[m_vip04].setNearAnchor(m_imageBox_vip[m_vip04], Tools.HCENTER_VCENTER, Tools.HCENTER_VCENTER, 0, 0);
		m_imageBox_background[m_vip05].setNearAnchor(m_imageBox_vip[m_vip05], Tools.HCENTER_VCENTER, Tools.HCENTER_VCENTER, 0, 0);
		m_imageBox_background[m_vip06].setNearAnchor(m_imageBox_vip[m_vip06], Tools.HCENTER_VCENTER, Tools.HCENTER_VCENTER, 0, 0);

		unShowBackGround(m_level-1);


		//vip等级提示
		m_textBox_vipLevel = new DWTextbox("VIP"+m_level+":");
		m_textBox_vipLevel.setFont(DWFont.getFont(16));
		m_textBox_vipLevel.setNearAnchor(m_imageBox_vip[m_vip01], Tools.LEFT_TOP, Tools.LEFT_BOTTOM, -20, 10);
		//刷新vip说明
		if(DWGameManager.AdpaterType == 2){
			m_listBox_vip = new DWListbox(500, 200);
		}else{
			m_listBox_vip = new DWListbox(400, 100);
		}
		m_listBox_vip.setNearAnchor(m_textBox_vipLevel, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 5);
		refreshVipListBox();

		m_vip_frame.addControl(m_background_big);
		m_vip_frame.addControl(m_vip_title);
		m_vip_frame.addControl(m_imageBox_title);
		m_vip_frame.addControl(m_imageBox_close);
		m_vip_frame.addControl(m_imageBox_mm);
		m_vip_frame.addControl(m_textBox_level);
		m_vip_frame.addControl(m_pb_level);
		m_vip_frame.addControl(m_image_vip);
		m_vip_frame.addControl(m_textBox_xianshi);
		m_vip_frame.addControl(m_textBox_state);
		m_vip_frame.addControl(m_button_level);
//		m_vip_frame.addControl(m_text_first);
//		m_vip_frame.addControl(m_imageBox_first);
//		m_vip_frame.addControl(m_text_firstNotice);
//		m_vip_frame.addControl(m_button_first);
		m_vip_frame.addControl(m_textBox_vip);
		m_vip_frame.addControl(m_background_vip);
		m_vip_frame.addControl(m_textBox_vipLevel);
		m_vip_frame.addControl(m_listBox_vip);
		for(int i=0;i<6;i++){
			m_vip_frame.addControl(m_imageBox_background[i]);
		}
		for(int i=0;i<6;i++){
			m_vip_frame.addControl(m_imageBox_vip[i]);
		}

		m_vip_frame.addControl(m_libao_text);
		m_vip_frame.addControl(m_libao_image[0]);
		m_vip_frame.addControl(m_libao_image[1]);
//		for(int i = 0;i <M_LIBAO;i++){
			m_vip_frame.addControl(m_libao_list);
//		}
			m_vip_frame.addControl(m_button);
		DWControlsManager.getInstance().addControl(m_vip_frame);

	}

	//关闭
	private DWListener m_close = new DWListener() {

		public void OnDoubleClick() {
		}

		public void OnClick() {
			UIWindows.getInstance().m_vip.close((byte)0);
		}
	};
	//充值
	private DWListener m_chongzhi = new DWListener() {

		public void OnDoubleClick() {
		}

		public void OnClick() {
			//注释掉。。
//			if (ChannelOperation.isChanneSdkChongZhi) {
//				ChannelOperation.sdkPay();
//			}
//			else {
//				ChannelOperation.openChongZhiWindow();
//				UIWindows.getInstance().m_vip.close((byte)0);
//			}
		}
	};
	//领取宝箱
//	private DWListener m_lingqu = new DWListener() {
//
//		public void OnDoubleClick() {
//		}
//
//		public void OnClick() {
//
//		}
//	};
	//vip的点选
	private DWListener m_open_vip01 = new DWListener() {

		public void OnDoubleClick() {
		}

		public void OnClick() {
			m_level = 1;
			m_textBox_vipLevel.setText("VIP1:");
			m_libao_text.setText("<mark c=FFBB11>VIP1:</mark>");
			unShowBackGround(0);
			DWGameManager.getInstance().getSendMessage().sendOpenVipLevel((byte)1);

		}
	};
	private DWListener m_open_vip02 = new DWListener() {

		public void OnDoubleClick() {
		}

		public void OnClick() {
			m_level = 2;
			m_textBox_vipLevel.setText("VIP2:");
			m_libao_text.setText("<mark c=FFBB11>VIP2:</mark>");
			unShowBackGround(1);
			DWGameManager.getInstance().getSendMessage().sendOpenVipLevel((byte)2);

		}
	};
	private DWListener m_open_vip03 = new DWListener() {

		public void OnDoubleClick() {
		}

		public void OnClick() {
			m_level = 3;
			m_textBox_vipLevel.setText("VIP3:");
			m_libao_text.setText("<mark c=FFBB11>VIP3:</mark>");
			unShowBackGround(2);
			DWGameManager.getInstance().getSendMessage().sendOpenVipLevel((byte)3);

		}
	};
	private DWListener m_open_vip04 = new DWListener() {

		public void OnDoubleClick() {
		}

		public void OnClick() {
			m_level = 4;
			m_textBox_vipLevel.setText("VIP4:");
			m_libao_text.setText("<mark c=FFBB11>VIP4:</mark>");
			unShowBackGround(3);
			DWGameManager.getInstance().getSendMessage().sendOpenVipLevel((byte)4);

		}
	};
	private DWListener m_open_vip05 = new DWListener() {

		public void OnDoubleClick() {
		}

		public void OnClick() {
			m_level = 5;
			m_textBox_vipLevel.setText("VIP5:");
			m_libao_text.setText("<mark c=FFBB11>VIP5:</mark>");
			unShowBackGround(4);
			DWGameManager.getInstance().getSendMessage().sendOpenVipLevel((byte)5);

		}
	};
	private DWListener m_open_vip06 = new DWListener() {

		public void OnDoubleClick() {
		}

		public void OnClick() {
			m_level = 6;
			m_textBox_vipLevel.setText("VIP6:");
			m_libao_text.setText("<mark c=FFBB11>VIP6:</mark>");
			unShowBackGround(5);
			DWGameManager.getInstance().getSendMessage().sendOpenVipLevel((byte)6);

		}
	};

	private void unShowBackGround(int num){
		for(int i=0;i<6;i++){
//			m_imageBox_background[i].setShow(false);
			m_imageBox_background[i].setBackground(m_bm_background, false);
		}
		if(num == -1 || num > 5){
			return;
		}
//		m_imageBox_background[num].setShow(true);
		m_imageBox_background[num].setBackground(m_bm_background01, false);
	}

	//刷新一下listBox中内容
	private void refreshVipListBox(){
		if(m_listBox_vip != null){
			m_listBox_vip.removeAllSubItem();
		}
		String[] str = m_str01.split(";");
		m_vip_item = new DWListSubItem[str.length];
		m_vip_textBox = new DWTextbox[str.length];
		for(int i = 0 ; i < str.length ; i++){
			m_vip_item[i] = new DWListSubItem();
			m_vip_textBox[i] = new DWTextbox(str[i],m_listBox_vip.getShowWidth()-10);
			m_vip_textBox[i].setNearAnchor(m_vip_item[i], Tools.LEFT_TOP, Tools.LEFT_TOP, 0, 0);
			m_vip_item[i].addControls(m_vip_textBox[i]);
			m_listBox_vip.addSubItem(m_vip_item[i]);
		}
	}
	//刷新左侧 lisbox
	private void refreshLiBao(){
		if(m_libao_list !=null){
			m_libao_list.removeAllSubItem();
			m_libao_grid = null;
			m_bm_icon = null;
			m_wupin_icon = null;
			m_libao_num =null;
			m_libao_item = null;
			m_libao_grid = new DWGrid[M_LIBAO];
			m_bm_icon = new Bitmap[M_LIBAO];
			m_wupin_icon = new DWImageBox[M_LIBAO];
			m_libao_num = new DWTextbox[M_LIBAO];
			m_libao_item = new DWListSubItem[M_LIBAO];
		}else{
			createVip();
		}
		for(int i=0;i<M_LIBAO/2+M_LIBAO%2;i++){
			final int index = i;
			m_libao_item[i] = new DWListSubItem();

			m_libao_grid[i] = new DWGrid(m_gr_libao);
			m_libao_grid[i].setNearAnchor(m_libao_item[i], Tools.LEFT_TOP, Tools.LEFT_TOP, 0, 0);

			m_bm_icon[i] = IconManger.getInstance().getIcon(m_item[i].m_iconId);
			m_wupin_icon[i] = new DWImageBox(m_bm_icon[i]);
			m_wupin_icon[i].setTouch(true);
			m_wupin_icon[i].setNearAnchor(m_libao_grid[i], Tools.HCENTER_VCENTER, Tools.HCENTER_VCENTER, 0, 0);

			m_libao_num[i] = new DWTextbox("×"+m_item[i].m_num);
			m_libao_num[i].setNearAnchor(m_libao_grid[i], Tools.LEFT_BOTTOM, Tools.RIGHT_BOTTOM, 0, 0);

			m_libao_item[i].addControls(m_libao_grid[i]);
			m_libao_item[i].addControls(m_libao_num[i]);
			m_libao_item[i].addControls(m_wupin_icon[i]);

			m_libao_list.addSubItem(m_libao_item[i]);


			//监听（购买按钮）
			m_wupin_icon[index].addListener(new DWListener() {
				public void OnDoubleClick() {
				}

				public void OnClick() {
					DWGameManager.getInstance().getSendMessage().sendLookVipShopItem(m_item[index].m_key);
				}
			});
		}
			for(int i = M_LIBAO/2+M_LIBAO%2; i < M_LIBAO;i++){
				final int index = i;
				int b = i-M_LIBAO/2-M_LIBAO%2;

				m_libao_grid[i] = new DWGrid(m_gr_libao);
				m_libao_grid[i].setNearAnchor(m_libao_item[b], Tools.LEFT_TOP, Tools.LEFT_TOP, m_libao_list.getShowWidth()/2, 0);

				m_bm_icon[i] = IconManger.getInstance().getIcon(m_item[i].m_iconId);
				m_wupin_icon[i] = new DWImageBox(m_bm_icon[i]);
				m_wupin_icon[i].setTouch(true);
				m_wupin_icon[i].setNearAnchor(m_libao_grid[i], Tools.HCENTER_VCENTER, Tools.HCENTER_VCENTER, 0, 0);

				m_libao_num[i] = new DWTextbox("×"+m_item[i].m_num);
				m_libao_num[i].setNearAnchor(m_libao_grid[i], Tools.LEFT_BOTTOM, Tools.RIGHT_BOTTOM, 0, 0);

				m_libao_item[b].addControls(m_libao_grid[i]);
				m_libao_item[b].addControls(m_libao_num[i]);
				m_libao_item[b].addControls(m_wupin_icon[i]);


				//监听
				m_wupin_icon[index].addListener(new DWListener() {

					public void OnDoubleClick() {
					}

					public void OnClick() {
						DWGameManager.getInstance().getSendMessage().sendLookVipShopItem(m_item[index].m_key);
					}
				});
			}
		if(m_button == null){
			m_button = new DWButton("领取", m_bm_level01);
			m_button.setDownImage(m_bm_level02);
			m_button.addListener(m_libao_button);
			m_button.setNearAnchor(m_libao_list, Tools.RIGHT_TOP, Tools.RIGHT_BOTTOM, 0, DWGameManager.Screen_Height/72);
		}

		if(m_libao_status == 0){
			m_button.setShow(false);
			m_button.setTouch(false);
		}else if(m_libao_status == 1){
			m_button.setName("领取");
			m_button.setShow(true);
			m_button.setTouch(true);
		}else if(m_libao_status == 2){
			m_button.setName("已领取");
			m_button.setShow(true);
			m_button.setTouch(true);
		}

	}

	private DWListener m_libao_button = new DWListener() {

		public void OnDoubleClick() {
		}

		public void OnClick() {
			if(m_libao_status == 2){
				DWGameManager.getInstance().addSystemInfo(DWGameManager.SYSTEM_INFO_TYPE_B, "已经领取！");
			}else{//发送领取指令
				DWGameManager.getInstance().getSendMessage().sendGetLiBao((byte)m_level);
			}
		}
	};

	public void init() {
		m_bm_close = UIWindows.createImage("/img/newui/fanhuianniu_1.gnp");
		m_bm_title = UIWindows.createImage("/img/newui/tequanvip_1.gnp");
		m_bm_mm = UIWindows.createImage("/img/newui/shangchengmn_1.gnp");//商城美女
		m_bm_top = UIWindows.createImage("/img/newui/viptiao_1.gnp");
		m_bm_buttom = UIWindows.createImage("/img/newui/viptiao_2.gnp");
		m_bm_level01 = UIWindows.createImage("/img/newui/anniu_10.gnp");
		m_bm_level02 = UIWindows.createImage("/img/newui/anniu_10ax.gnp");
		m_bm_hezi = UIWindows.createImage("/img/newui/1xiangzi0.gnp");//宝箱
		m_bm_background = UIWindows.createImage("/img/newui/anniu_15.gnp");//xuanzekuang_2
		m_bm_background01 = UIWindows.createImage("/img/newui/anniu_15ax.gnp");
		m_bm_vip[m_vip01] = UIWindows.createImage("/img/newui/vip_1.gnp");
		m_bm_vip[m_vip02] = UIWindows.createImage("/img/newui/vip_2.gnp");
		m_bm_vip[m_vip03] = UIWindows.createImage("/img/newui/vip_3.gnp");
		m_bm_vip[m_vip04] = UIWindows.createImage("/img/newui/vip_4.gnp");
		m_bm_vip[m_vip05] = UIWindows.createImage("/img/newui/vip_5.gnp");
		m_bm_vip[m_vip06] = UIWindows.createImage("/img/newui/vip_6.gnp");

		m_gr_libao = UIWindows.createImage("/img/newui/wupinlan.gnp");
		m_bm_libao = UIWindows.createImage("/img/icon/big_datubiao_363.gnp");
	}

	public void open(byte index) {
		if(flag == false){
			flag = true;
			createVip();
		}else{
			if(m_vip_frame != null){
				DWControlsManager.getInstance().addControl(m_vip_frame);
			}else{
				return;
			}
		}

	}

	public void close(byte index) {
		flag = false;
		DWControlsManager.getInstance().removeControl(m_vip_frame);
	}

	public void dispose() {

	}

	public void logic()
	{
		// TODO Auto-generated method stub

	}
	private DWFrame m_libao_frame = null;
	private DWBackground m_libao_backGround = null;
	private DWImageBox m_look_close = null;
	private DWListbox m_libao_listBox = null;
	private DWListSubItem m_libao_listItem = null;
	public static final String[][] 类型名称 = {
		{ "武器", "头部", "上衣", "腰带", "裤子", "鞋子", "称号", "项链", "手腕", "戒指", "时装", "法宝", "护符", "坐骑", "预留1", "预留2" },
		{ "", "血蓝药", "状态药", "增强药", "传送券", "触发任务卷", "礼包", "喇叭", "宝箱1", "商城道具", "宝箱2", "宠物蛋", "", "" },
		{ "", "宝石" },
		{ "", "任务", "特殊功能", "钥匙" }
	};
	public static final String[] 装备_绑定类型 = { "不绑定", "装备后绑定", "拾取后绑定", "使用后绑定" };
	public static final String[] 装备_基础属性 = { "物理攻击", "法术攻击", "物理防御", "法术防御" };
	DWControl lastControl;
	public void lookLibao(Item item){
		m_libao_frame = new DWFrame(DWFrame.FRAME_TYPE_HALF_HCENTER, true);
		m_libao_frame.setClickClose(false);

		m_look_close = new DWImageBox(m_bm_close);
		m_look_close.addListener(m_guanbi);
		m_look_close.setNearAnchor(m_libao_frame, Tools.RIGHT_TOP, Tools.RIGHT_TOP, 0, 0);

		m_libao_backGround = new DWBackground(m_libao_frame.getShowWidth(), m_libao_frame.getShowHeight());
		m_libao_backGround.setFill(true);
		m_libao_backGround.setNearAnchor(m_libao_frame, Tools.LEFT_TOP, Tools.LEFT_TOP, 0, 0);
		m_libao_frame.addControl(m_libao_backGround);

		m_libao_listBox = new DWListbox(m_libao_frame.getShowWidth()-m_look_close.getShowWidth(), m_libao_frame.getShowHeight() - m_look_close.getShowHeight());
		m_libao_listBox.setNearAnchor(m_libao_backGround, Tools.LEFT_TOP, Tools.LEFT_TOP, m_look_close.getShowWidth()/2, m_look_close.getShowHeight());

		m_libao_listItem = new DWListSubItem();

		infoItem(item);

		m_libao_frame.addControl(m_libao_listBox);
		m_libao_frame.addControl(m_look_close);
		DWControlsManager.getInstance().addControl(m_libao_frame);

	}

	private DWListener m_guanbi = new DWListener() {

		public void OnDoubleClick() {
		}

		public void OnClick() {
			DWControlsManager.getInstance().removeControl(m_libao_frame);
		}
	};

	public void infoItem(Item m_buy_item01){
		Bitmap m_grid = IconManger.getInstance().getIcon(m_buy_item01.m_iconId);
		DWGrid m_buy_grid = new DWGrid(m_grid);
		m_libao_listItem.addControls(m_buy_grid);
		m_buy_grid.setNearAnchor(m_libao_listItem, Tools.LEFT_TOP, Tools.LEFT_TOP, 0, 0);
		//装备名称
		lastControl = null;
				String name = "<mark c=" + UIBag.getNameColor(m_buy_item01.m_quality) + ">" + m_buy_item01.m_name + "</mark>";
				if (m_buy_item01.m_type == ItemConstants.道具类型_装备) {
					if (((ItemEquipment) m_buy_item01).m_strengthenLevel > 0)
						name += "<mark c=FFBB11>("
								+ ((ItemEquipment) m_buy_item01).getProductOrder(((ItemEquipment) m_buy_item01).m_strengthenLevel) + ")</mark>";
				}

				DWTextbox item_equip_name = new DWTextbox(name, 200);
				item_equip_name.setNearAnchor(m_buy_grid, Tools.LEFT_VCENTER, Tools.RIGHT_VCENTER, 20, 0);
				m_libao_listItem.addControls(item_equip_name);

				//装备类别
				Tools.debugPrintln("item.m_type=" + m_buy_item01.m_type + "item.m_subtype=" + m_buy_item01.m_subtype);
				String type = "<mark c=FFBB11>类别：</mark>";
				if (类型名称.length > (m_buy_item01.m_type - 1) && 类型名称[m_buy_item01.m_type - 1].length > m_buy_item01.m_subtype)
				{
					type += 类型名称[m_buy_item01.m_type - 1][m_buy_item01.m_subtype];
				}
				if (m_buy_item01.m_bindingState == ItemConstants.绑定状态_是) {
					type += "  已绑定";
				}
				else if (m_buy_item01.m_bindingState == ItemConstants.绑定状态_否) {
					type += "  " + 装备_绑定类型[m_buy_item01.m_bindingType];
				}

				DWTextbox item_equip_type = new DWTextbox(type, m_libao_listBox.getShowWidth());
				item_equip_type.setNearAnchor(m_buy_grid, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 20);
				m_libao_listItem.addControls(item_equip_type);

				lastControl = item_equip_type;

				//装备评分
				if (m_buy_item01.m_type == ItemConstants.道具类型_装备 && ((ItemEquipment) m_buy_item01).m_gs>0) {

					DWTextbox item_equip_gs = new DWTextbox("<mark c=FFBB11>装备评分:</mark>" + ((ItemEquipment) m_buy_item01).m_gs,
							200);
					item_equip_gs.setNearAnchor(lastControl, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 5);
					m_libao_listItem.addControls(item_equip_gs);

					lastControl = item_equip_gs;
				}

				//使用限制
				String limit = "<mark c=FFBB11>使用限制:</mark>";
				if (m_buy_item01.m_minLevelLimit > 0) {
					limit += m_buy_item01.m_minLevelLimit + "级以上使用";
				}
				if (m_buy_item01.m_maxLevelLimit > 0) {
					limit += m_buy_item01.m_maxLevelLimit + "级以下使用";
				}
				String str = "   " + Role.ROLE_VOCATION_LIST[m_buy_item01.m_jobLimit];
				if (m_buy_item01.m_isLimit) {
					str = "<mark c=FF3300>" + str + "</mark>";
				}

				if (m_buy_item01.m_jobLimit > 0)
					limit += str;

				if (!limit.trim().equals("<mark c=FFBB11>使用限制:</mark>"))
				{
					DWTextbox item_equip_Limit = new DWTextbox(limit, m_libao_listBox.getShowWidth());
					item_equip_Limit.setNearAnchor(lastControl, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 5);
					m_libao_listItem.addControls(item_equip_Limit);

					lastControl = item_equip_Limit;
				}

				//耐久值
				if (m_buy_item01.m_type == ItemConstants.道具类型_装备 && ((ItemEquipment) m_buy_item01).m_nowDurable != 0) {
					String durable = "<mark c=FFBB11>耐久值：</mark>";

					durable += ((ItemEquipment) m_buy_item01).m_nowDurable + "/" + ((ItemEquipment) m_buy_item01).m_maxDurable;
					DWTextbox item_equip_Durable = new DWTextbox(durable, m_libao_listBox.getShowWidth());
					item_equip_Durable.setNearAnchor(lastControl, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 5);
					m_libao_listItem.addControls(item_equip_Durable);
					lastControl = item_equip_Durable;
				}

				//基础属性
				if (m_buy_item01.m_type == ItemConstants.道具类型_装备) {
					String baseDate = "";
					for (int i = 0; i < 4; i++) {
						if (((ItemEquipment) m_buy_item01).m_attrValue[i + Attribute.PHY_ATTACK] != 0) {
							baseDate += "<mark c=FFBB11>" + Attribute.ATTRIBUTE_NAME[i + Attribute.PHY_ATTACK] + "：</mark>";
							baseDate += ((ItemEquipment) m_buy_item01).m_attrValue[i + Attribute.PHY_ATTACK];

							if (((ItemEquipment) m_buy_item01).m_attrAddValue[i + Attribute.PHY_ATTACK] > 0) {
								baseDate += "    <mark c=FFBB11>+"
										+ ((ItemEquipment) m_buy_item01).m_attrAddValue[i + Attribute.PHY_ATTACK] + "</mark>";
							}else if(((ItemEquipment) m_buy_item01).m_attrAddValue[i + Attribute.PHY_ATTACK] < 0)
								baseDate += "    <mark c=FF3300>"
										+ ((ItemEquipment) m_buy_item01).m_attrAddValue[i + Attribute.PHY_ATTACK] + "</mark>";
							if (i != 3)
								baseDate += "`";
						}
					}
					if (!baseDate.equals("")) {
						DWTextbox item_equip_baseDate = new DWTextbox(baseDate, m_libao_listBox.getShowWidth());
						item_equip_baseDate.setNearAnchor(lastControl, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 5);
						m_libao_listItem.addControls(item_equip_baseDate);

						lastControl = item_equip_baseDate;
					}

					//镶嵌宝石宝石

					if (((ItemEquipment) m_buy_item01).m_equipGemsSize > 0) {
						DWImageBox gemsImg[] = new DWImageBox[((ItemEquipment) m_buy_item01).m_equipGemsSize];
						for (int i = 0; i < gemsImg.length; i++) {
							gemsImg[i] = new DWImageBox(((ItemEquipment) m_buy_item01).m_gemSamllIcon[i]);
							DWTextbox gemsMsg = new DWTextbox("<mark c=FFBB11> " + ((ItemEquipment) m_buy_item01).getGemDatas(i)
									+ "</mark>");
							if (i % 2 == 0) {
								gemsImg[i].setNearAnchor(lastControl, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 5);
								lastControl = gemsImg[i];
							}
							else {
								gemsImg[i].setNearAnchor(gemsImg[i - 1], Tools.LEFT_VCENTER, Tools.RIGHT_VCENTER, 100, 0);
							}
							gemsMsg.setNearAnchor(gemsImg[i], Tools.LEFT_VCENTER, Tools.RIGHT_VCENTER, 5, 0);
							m_libao_listItem.addControls(gemsImg[i]);
							m_libao_listItem.addControls(gemsMsg);
						}
					}
				}

				//随机的附加属性
				if (m_buy_item01.m_type == ItemConstants.道具类型_装备) {
					StringBuilder attrValue = new StringBuilder();
					for (int i = 0; i < ((ItemEquipment) m_buy_item01).m_attrValue.length; i++) {
						if (i > Attribute.SPEED && i < Attribute.HIT)
							continue;

						if (((ItemEquipment) m_buy_item01).m_attrValue[i] > 0) {
							attrValue.append("<mark c=00FF00>" + Attribute.ATTRIBUTE_NAME[i] + ":+"
									+ ((ItemEquipment) m_buy_item01).m_attrValue[i] + "</mark>`");
						}
						else if (((ItemEquipment) m_buy_item01).m_attrValue[i] < 0) {
							attrValue.append("<mark c=999999>" + Attribute.ATTRIBUTE_NAME[i] + ":"
									+ ((ItemEquipment) m_buy_item01).m_attrValue[i] + "</mark>`");
						}
					}

					if (attrValue != null && attrValue.length() > 0) {
						DWTextbox item_equip_attrValue = new DWTextbox(attrValue.toString(), m_libao_listBox.getShowWidth());
						item_equip_attrValue.setNearAnchor(lastControl, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 10);
						m_libao_listItem.addControls(item_equip_attrValue);

						lastControl = item_equip_attrValue;
					}
				}
				else if (m_buy_item01.m_type == ItemConstants.道具类型_宝石) {
					String attrValue = "<mark c=00FF00>" + Attribute.ATTRIBUTE_NAME[((ItemGem) m_buy_item01).m_attrindex] + ": +"
							+ ((ItemGem) m_buy_item01).m_attrvalue + "</mark>";
					DWTextbox item_equip_attrValue = new DWTextbox(attrValue, m_libao_listBox.getShowWidth());
					item_equip_attrValue.setNearAnchor(lastControl, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 10);
					m_libao_listItem.addControls(item_equip_attrValue);
					lastControl = item_equip_attrValue;
				}

				//套装

				//描述
				if (m_buy_item01.m_descl != null && !(m_buy_item01.m_descl.equals(""))) {
					String prodyctOrder = "";
					prodyctOrder = "<mark c=FFFFFF>" + m_buy_item01.m_descl + "</mark>";

					DWTextbox item_equip_prodyctOrder = new DWTextbox(prodyctOrder, m_libao_listBox.getShowWidth());
					item_equip_prodyctOrder.setNearAnchor(lastControl, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 5);
					m_libao_listItem.addControls(item_equip_prodyctOrder);
					lastControl = item_equip_prodyctOrder;
				}

				//寄宿精魂

				//解绑次数
				if (m_buy_item01.m_maxUnbindingTimes > 0)
				{
					String bindingTimes = "<mark c=FFBB11>解绑次数：</mark>"
							+ (m_buy_item01.m_maxUnbindingTimes - m_buy_item01.m_usedUnbindingTimes)
							+ "/" + m_buy_item01.m_maxUnbindingTimes;
					DWTextbox item_equip_bindingTimes = new DWTextbox(bindingTimes, m_libao_listBox.getShowWidth());
					item_equip_bindingTimes.setNearAnchor(lastControl, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 5);
					m_libao_listItem.addControls(item_equip_bindingTimes);
					lastControl = item_equip_bindingTimes;
				}

				//限制时间
				if (m_buy_item01.m_lifecycle > 0)
				{
					DWTextbox item_equip_lifecycle = new DWTextbox("<mark c=FFBB11>限制时间：</mark>"
							+ (m_buy_item01.m_lifecycle > 0 ? UIBag.getTime(m_buy_item01.m_lifecycle,UIBag.DAYTYPE) : "无"), 200);
					item_equip_lifecycle.setNearAnchor(lastControl, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 5);
					m_libao_listItem.addControls(item_equip_lifecycle);
					lastControl = item_equip_lifecycle;
				}

				//出售价格

				DWTextbox item_equip_goldPrice = new DWTextbox("<mark c=FFBB11>出售价格：</mark>" + m_buy_item01.m_goldPrice, 200);
				item_equip_goldPrice.setNearAnchor(lastControl, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 5);
				m_libao_listItem.addControls(item_equip_goldPrice);
				lastControl = item_equip_goldPrice;

				//
				DWTextbox item_equip_end = new DWTextbox("<mark c=FFFFFF></mark>", m_libao_listBox.getShowWidth());
				item_equip_end.setNearAnchor(lastControl, Tools.LEFT_TOP, Tools.LEFT_BOTTOM, 0, 5);
				m_libao_listItem.addControls(item_equip_end);
				m_libao_listBox.addSubItem(m_libao_listItem);

	}

	/**
	 * 开启界面的时候接收
	 * @param dis
	 * @throws IOException
	 */
	public void recvOpenVIP(DataInputStream dis) throws IOException{
		DWGameManager.getInstance().getSendMessage().unlockNetwork(GameMessage.锁_VIP特权);
		try {
			byte level = dis.readByte();//vip等级
			long num = dis.readLong();//当前元宝数
			long numMax = dis.readLong();//升级所需元宝
//			byte iconNum = dis.readByte();//几个图标
//			iconId = new int[iconNum];
//			for(int i=0;i < iconNum;i++){
//				iconId[i] = dis.readByte();//图标id
//			}
			String str = dis.readUTF();//当前vip描述
			m_level = level;
			if(m_level == 0){
				m_level = 1;
			}
			m_num = num;
			m_numMax = numMax;
			m_str01 = str;
			if(m_num > m_numMax){
				m_num = m_numMax;
			}
			M_LIBAO = dis.readByte();//多少物品
			m_item = new Item[M_LIBAO];
			for(int i = 0;i<M_LIBAO;i++){
				Item item = new Item();
				item.m_iconId = dis.readInt();
				item.m_num = dis.readInt();
				item.m_key  = dis.readUTF();
				m_item[i] = item;
			}

			m_libao_status = dis.readByte();

			UIWindows.getInstance().m_vip.open((byte)0);
		} catch (Exception e) {
			Tools.debug(e);
		}
	}

	/**
	 * 开启等级描述接收
	 * @param dis
	 * @throws IOException
	 */
	public void recvVipLevel(DataInputStream dis) throws IOException {
		DWGameManager.getInstance().getSendMessage().unlockNetwork(GameMessage.锁_VIP特权);
		try {
			String str = dis.readUTF();
			M_LIBAO = dis.readByte();//多少物品
			Item[] m_item01 = new Item[M_LIBAO];
			for(int i = 0;i<M_LIBAO;i++){
				Item item = new Item();
				item.m_iconId = dis.readInt();
				item.m_num = dis.readInt();
				item.m_key  = dis.readUTF();
				m_item01[i] = item;
			}
			m_item = m_item01;
			m_libao_status = dis.readByte();
			m_str01 = str;
			refreshVipListBox();
			refreshLiBao();
		} catch (Exception e) {
			Tools.debug(e);
		}
	}

	/**
	 * 接收成功
	 * @param dis
	 * @throws IOException
	 */
	public void recvGetLi(DataInputStream dis) throws IOException {

		try {
			m_button.setName("已领取");
			m_button.setShow(true);
			m_button.setTouch(true);
		} catch (Exception e) {
			Tools.debug(e);
		}
	}

	public int[] iconId;
	public int m_level = 0;
	public long m_num = 0;
	public long m_numMax = 0;
	public String m_str01 = null;
	public String m_str02 = null;

}
